package com.hadwinling.blog.service;

import com.hadwinling.blog.entity.Comment;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author HadwinLing
 * @version V1.0
 * @Package com.hadwinling.blog.service
 * @date 2020/8/19 7:47
 */
public interface CommentService {


    int deleteByPrimaryKey(Integer id);

    int insert(Comment record);

    int insertSelective(Comment record);

    Comment selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Comment record);

    int updateByPrimaryKey(Comment record);

    //根据某个 文章查询所有评论
    List<Comment> selectAllByArticleidOrderByCreatetimeDesc(Integer articleid);
    //根据parentcommentid 查询评论
    List<Comment> selectAllByParentcommentidOrderByCreatetimeDesc(Integer parentcommentid);
    //更新评论数目
    int updateCommentcountByParentcommentid(Integer parentcommentid);


}






